package xjtu.se.articlecommunity.admin.info.dao;

import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import xjtu.se.articlecommunity.admin.info.dto.Admin;
import xjtu.se.articlecommunity.common.dto.CurrentUser;

public interface InfoDao {


    @Select("select u_id, u_name, u_tel, u_mail from t_user where u_id = #{u_id}")
    Admin getInfo(CurrentUser currentUser);

    @Update("update t_user set u_passwd = #{u_pwd} where u_id = #{u_id}")
    void updatePwd(Admin admin) ;

    @Update("update t_user set u_tel = #{u_tel} where u_id = #{u_id}")
    void updateTel(Admin admin);

    @Update("update t_user set u_mail = #{u_mail} where u_id = #{u_id}")
    void updateMail(Admin admin);
}
